﻿//---------------------------------------------------------------------------
// <copyright file="RibbonGroupSizeDefinitionCollection.cs" company="Microsoft Corporation">
//     Copyright (C) Microsoft Corporation.  All rights reserved.
// </copyright>
//---------------------------------------------------------------------------

namespace Microsoft.Windows.Controls.Ribbon
{
    #region Using declarations

    using System.Collections.ObjectModel;

    #endregion

    /// <summary>
    ///   Provides a familiar name for XAML usage for a collection of RibbonGroupSizeDefinitions.
    /// </summary>
    public class RibbonGroupSizeDefinitionCollection : Collection<RibbonGroupSizeDefinition>
    {
        #region Fields

        /// <summary>
        ///   Cached value for the one-button RibbonGroupSizeDefinition.
        /// </summary>
        private static RibbonGroupSizeDefinitionCollection _oneButton;

        /// <summary>
        ///   Cached value for the two-button RibbonGroupSizeDefinition.
        /// </summary>
        private static RibbonGroupSizeDefinitionCollection _twoButtons;

        /// <summary>
        ///   Cached value for the three-button RibbonGroupSizeDefinition.
        /// </summary>
        private static RibbonGroupSizeDefinitionCollection _threeButtons;

        /// <summary>
        ///   Cached value for the four-button RibbonGroupSizeDefinition.
        /// </summary>
        private static RibbonGroupSizeDefinitionCollection _fourButtons;

        /// <summary>
        ///   Cached value for the five-button RibbonGroupSizeDefinition.
        /// </summary>
        private static RibbonGroupSizeDefinitionCollection _fiveButtons;

        /// <summary>
        ///   Cached value for the six-button RibbonGroupSizeDefinition.
        /// </summary>
        private static RibbonGroupSizeDefinitionCollection _sixButtons;

        /// <summary>
        ///   Cached value for the seven-button RibbonGroupSizeDefinition.
        /// </summary>
        private static RibbonGroupSizeDefinitionCollection _sevenButtons;

        /// <summary>
        ///   Cached value for the eight-button RibbonGroupSizeDefinition.
        /// </summary>
        private static RibbonGroupSizeDefinitionCollection _eightButtons;

        /// <summary>
        ///   Cached value for the nine-button RibbonGroupSizeDefinition.
        /// </summary>
        private static RibbonGroupSizeDefinitionCollection _nineButtons;

        /// <summary>
        ///   Cached value for the eleven-button RibbonGroupSizeDefinition.
        /// </summary>
        private static RibbonGroupSizeDefinitionCollection _tenButtons;

        /// <summary>
        ///   Cached value for the twelve-button RibbonGroupSizeDefinition.
        /// </summary>
        private static RibbonGroupSizeDefinitionCollection _elevenButtons;

        #endregion

        #region OneButton SizeDefinition

        /// <summary>
        ///   Gets the default one-button RibbonGroupSizeDefinition.
        /// </summary>
        public static RibbonGroupSizeDefinitionCollection OneButton
        {
            get
            {
                if (_oneButton == null)
                {
                    RibbonGroupSizeDefinition large = new RibbonGroupSizeDefinition();
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    
                    RibbonGroupSizeDefinition collapsed = new RibbonGroupSizeDefinition() { IsCollapsed = true };

                    _oneButton = new RibbonGroupSizeDefinitionCollection();
                    _oneButton.Add(large);
                    _oneButton.Add(collapsed);
                }

                return _oneButton;
            }
        }

        #endregion

        #region TwoButtons SizeDefinition

        /// <summary>
        ///   Gets the default two-button RibbonGroupSizeDefinition.
        /// </summary>
        public static RibbonGroupSizeDefinitionCollection TwoButtons
        {
            get
            {
                if (_twoButtons == null)
                {
                    RibbonGroupSizeDefinition large = new RibbonGroupSizeDefinition();
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    
                    RibbonGroupSizeDefinition medium = new RibbonGroupSizeDefinition();
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    
                    RibbonGroupSizeDefinition collapsed = new RibbonGroupSizeDefinition() { IsCollapsed = true };

                    _twoButtons = new RibbonGroupSizeDefinitionCollection();
                    _twoButtons.Add(large);
                    _twoButtons.Add(medium);
                    _twoButtons.Add(collapsed);
                }

                return _twoButtons;
            }
        }

        #endregion

        #region ThreeButtons SizeDefinition

        /// <summary>
        ///   Gets the default three-button RibbonGroupSizeDefinition.
        /// </summary>
        public static RibbonGroupSizeDefinitionCollection ThreeButtons
        {
            get
            {
                if (_threeButtons == null)
                {
                    RibbonGroupSizeDefinition large = new RibbonGroupSizeDefinition();
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });

                    RibbonGroupSizeDefinition medium = new RibbonGroupSizeDefinition();
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });

                    RibbonGroupSizeDefinition collapsed = new RibbonGroupSizeDefinition() { IsCollapsed = true };

                    _threeButtons = new RibbonGroupSizeDefinitionCollection();
                    _threeButtons.Add(large);
                    _threeButtons.Add(medium);
                    _threeButtons.Add(collapsed);
                }

                return _threeButtons;
            }
        }

        #endregion

        #region FourButtons SizeDefinition

        /// <summary>
        ///   Gets the default four-button RibbonGroupSizeDefinition.
        /// </summary>
        public static RibbonGroupSizeDefinitionCollection FourButtons
        {
            get
            {
                if (_fourButtons == null)
                {
                    RibbonGroupSizeDefinition large = new RibbonGroupSizeDefinition();
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });

                    RibbonGroupSizeDefinition medium = new RibbonGroupSizeDefinition();
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });

                    RibbonGroupSizeDefinition small = new RibbonGroupSizeDefinition();
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });

                    RibbonGroupSizeDefinition collapsed = new RibbonGroupSizeDefinition() { IsCollapsed = true };

                    _fourButtons = new RibbonGroupSizeDefinitionCollection();
                    _fourButtons.Add(large);
                    _fourButtons.Add(medium);
                    _fourButtons.Add(small);
                    _fourButtons.Add(collapsed);
                }

                return _fourButtons;
            }
        }

        #endregion

        #region FiveButtons SizeDefinition

        /// <summary>
        ///   Gets the default five-button RibbonGroupSizeDefinition.
        /// </summary>
        public static RibbonGroupSizeDefinitionCollection FiveButtons
        {
            get
            {
                if (_fiveButtons == null)
                {
                    RibbonGroupSizeDefinition large = new RibbonGroupSizeDefinition();
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });

                    RibbonGroupSizeDefinition medium = new RibbonGroupSizeDefinition();
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });

                    RibbonGroupSizeDefinition small = new RibbonGroupSizeDefinition();
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });

                    RibbonGroupSizeDefinition collapsed = new RibbonGroupSizeDefinition() { IsCollapsed = true };

                    _fiveButtons = new RibbonGroupSizeDefinitionCollection();
                    _fiveButtons.Add(large);
                    _fiveButtons.Add(medium);
                    _fiveButtons.Add(small);
                    _fiveButtons.Add(collapsed);
                }

                return _fiveButtons;
            }
        }

        #endregion

        #region SixButtons SizeDefinition

        /// <summary>
        ///   Gets the default six-button RibbonGroupSizeDefinition.
        /// </summary>
        public static RibbonGroupSizeDefinitionCollection SixButtons
        {
            get
            {
                if (_sixButtons == null)
                {
                    RibbonGroupSizeDefinition large = new RibbonGroupSizeDefinition();
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });

                    RibbonGroupSizeDefinition medium = new RibbonGroupSizeDefinition();
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });

                    RibbonGroupSizeDefinition small = new RibbonGroupSizeDefinition();
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });

                    RibbonGroupSizeDefinition collapsed = new RibbonGroupSizeDefinition() { IsCollapsed = true };

                    _sixButtons = new RibbonGroupSizeDefinitionCollection();
                    _sixButtons.Add(large);
                    _sixButtons.Add(medium);
                    _sixButtons.Add(small);
                    _sixButtons.Add(collapsed);
                }

                return _sixButtons;
            }
        }

        #endregion

        #region SevenButtons SizeDefinition

        /// <summary>
        ///   Gets the default seven-button RibbonGroupSizeDefinition.
        /// </summary>
        public static RibbonGroupSizeDefinitionCollection SevenButtons
        {
            get
            {
                if (_sevenButtons == null)
                {
                    RibbonGroupSizeDefinition large = new RibbonGroupSizeDefinition();
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    
                    RibbonGroupSizeDefinition medium = new RibbonGroupSizeDefinition();
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    
                    RibbonGroupSizeDefinition small = new RibbonGroupSizeDefinition();
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });

                    RibbonGroupSizeDefinition collapsed = new RibbonGroupSizeDefinition() { IsCollapsed = true };

                    _sevenButtons = new RibbonGroupSizeDefinitionCollection();
                    _sevenButtons.Add(large);
                    _sevenButtons.Add(medium);
                    _sevenButtons.Add(small);
                    _sevenButtons.Add(collapsed);
                }

                return _sevenButtons;
            }
        }

        #endregion

        #region EightButtons SizeDefinition

        /// <summary>
        ///   Gets the default eight-button RibbonGroupSizeDefinition.
        /// </summary>
        public static RibbonGroupSizeDefinitionCollection EightButtons
        {
            get
            {
                if (_eightButtons == null)
                {
                    RibbonGroupSizeDefinition large = new RibbonGroupSizeDefinition();
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });

                    RibbonGroupSizeDefinition medium = new RibbonGroupSizeDefinition();
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });

                    RibbonGroupSizeDefinition small = new RibbonGroupSizeDefinition();
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });

                    RibbonGroupSizeDefinition collapsed = new RibbonGroupSizeDefinition() { IsCollapsed = true };

                    _eightButtons = new RibbonGroupSizeDefinitionCollection();
                    _eightButtons.Add(large);
                    _eightButtons.Add(medium);
                    _eightButtons.Add(small);
                    _eightButtons.Add(collapsed);
                }

                return _eightButtons;
            }
        }

        #endregion

        #region NineButtons SizeDefinition

        /// <summary>
        ///   Gets the default nine-button RibbonGroupSizeDefinition.
        /// </summary>
        public static RibbonGroupSizeDefinitionCollection NineButtons
        {
            get
            {
                if (_nineButtons == null)
                {
                    RibbonGroupSizeDefinition large = new RibbonGroupSizeDefinition();
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });

                    RibbonGroupSizeDefinition medium = new RibbonGroupSizeDefinition();
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });

                    RibbonGroupSizeDefinition small = new RibbonGroupSizeDefinition();
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });

                    RibbonGroupSizeDefinition collapsed = new RibbonGroupSizeDefinition() { IsCollapsed = true };

                    _nineButtons = new RibbonGroupSizeDefinitionCollection();
                    _nineButtons.Add(large);
                    _nineButtons.Add(medium);
                    _nineButtons.Add(small);
                    _nineButtons.Add(collapsed);
                }

                return _nineButtons;
            }
        }

        #endregion

        #region TenButtons SizeDefinition

        /// <summary>
        ///   Gets the default ten-button RibbonGroupSizeDefinition.
        /// </summary>
        public static RibbonGroupSizeDefinitionCollection TenButtons
        {
            get
            {
                if (_tenButtons == null)
                {
                    RibbonGroupSizeDefinition large = new RibbonGroupSizeDefinition();
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });

                    RibbonGroupSizeDefinition medium = new RibbonGroupSizeDefinition();
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });

                    RibbonGroupSizeDefinition small = new RibbonGroupSizeDefinition();
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = false });

                    RibbonGroupSizeDefinition collapsed = new RibbonGroupSizeDefinition() { IsCollapsed = true };

                    _tenButtons = new RibbonGroupSizeDefinitionCollection();
                    _tenButtons.Add(large);
                    _tenButtons.Add(medium);
                    _tenButtons.Add(small);
                    _tenButtons.Add(collapsed);
                }

                return _tenButtons;
            }
        }

        #endregion

        #region ElevenButtons SizeDefinition

        /// <summary>
        ///   Gets the default eleven-button RibbonGroupSizeDefinition.
        /// </summary>
        public static RibbonGroupSizeDefinitionCollection ElevenButtons
        {
            get
            {
                if (_elevenButtons == null)
                {
                    RibbonGroupSizeDefinition large = new RibbonGroupSizeDefinition();
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    large.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });

                    RibbonGroupSizeDefinition medium = new RibbonGroupSizeDefinition();
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    medium.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });

                    RibbonGroupSizeDefinition small = new RibbonGroupSizeDefinition();
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Large, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });
                    small.ControlSizeDefinitions.Add(new RibbonControlSizeDefinition() { ImageSize = RibbonImageSize.Small, IsLabelVisible = true });

                    RibbonGroupSizeDefinition collapsed = new RibbonGroupSizeDefinition() { IsCollapsed = true };

                    _elevenButtons = new RibbonGroupSizeDefinitionCollection();
                    _elevenButtons.Add(large);
                    _elevenButtons.Add(medium);
                    _elevenButtons.Add(small);
                    _elevenButtons.Add(collapsed);
                }

                return _elevenButtons;
            }
        }

        #endregion
    }
}